import pandas as pd

data_file = "data/alldata/单一销方单位连号模型分析结果.xlsx"

data = pd.read_excel(data_file)
risk_level_1 = True  # 一级风险
risk_level_2 = True  # 二级风险
amount_level_1 = True  # 发票一级
amount_level_2 = False  # 发票二级

risk_ = []
if risk_level_1:
    risk_.append("一级")
if risk_level_2:
    risk_.append("二级")

print(data["风险等级"])
if len(risk_):
    data = data[data["风险等级"].isin(risk_)]

amount_ = []
if amount_level_1:
    amount_.append("一级")
if amount_level_2:
    amount_.append("二级")

if len(amount_):
    data = data[data["发票金额等级"].isin(amount_)]

print(data)